package com.example.visitsweb.controller;

import java.lang.String;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.visitsweb.dto.VisitsRcodeDto;
import com.example.visitsweb.entity.Verify;
import com.example.visitsweb.lang.Result;
import com.example.visitsweb.mapper.VerifyMapper;
import com.example.visitsweb.service.VerifyService;
import com.example.visitsweb.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author MarkerHub
 * @since 2022-04-26
 */
@RestController
@CrossOrigin
@RequestMapping("/verify")
public class VerifyController {
    @Autowired
    VerifyService verifyService;
    @Autowired
    RedisUtil redisUtil;
@GetMapping("/code")
    public Result getCode(@RequestParam("phone")String phone){

    return Result.succ(verifyService.getCode(phone));
}

}
